Skip to content

buildbox: add new helm unittest plugin fork#18945

Merged
hugoShaka merged 3 commits intomasterfrom
hugo/buildbox-12.1
Dec 2, 2022
Merged

buildbox: add new helm unittest plugin fork#18945
hugoShaka merged 3 commits intomasterfrom
hugo/buildbox-12.1

Conversation

@hugoShaka
Copy link
Copy Markdown
Contributor

@hugoShaka hugoShaka commented Nov 30, 2022

This PR installs a second instance of the helm-unittest plugin in the teleport12 buildbox.

helm-unittest plugin is unmaintained and everyone forked. We are relying on an unmaintained fork with several broken features, including features I need to test the split auth/proxy chart.

The plugin name is the same for the multiple forks but the signature and behaviour are radically different. Changing the plugin in the current teleport12 buildbox would cause all past jobs relying on teleport12 to fail (it breaks make test and make -C build.assets test).

A subsequent PR will come with the updated tests, makefile command, GHA and GCB pipeline to use the new plugin fork.

@hugoShaka hugoShaka requested a review from r0mant November 30, 2022 20:47
Comment thread build.assets/images.mk Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break the Drone as the image update also requires updating the .drone.yml (check the comment above).
We've also never published .1 release on master. Any changes to solve this issue without changing the image tag?

Copy link
Copy Markdown
Contributor Author

@hugoShaka hugoShaka Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@r0mant also challenged me on the image tag. Changing the helm-unittest binary in the current buildbox tag will cause all pipelines from the past 3 weeks to be non-retyable and all commits on master between the v11 -> v12 change and this commit would have make test failing.

For the drone part I wanted to build the image in this PR but start using it in the next one. The image needs to be here for the tests to pass, but the changing the image requires code change as 12 and 12.1 are not compatible and it would break tests.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think updating buildbox version here is not too bad. We gotta have some way to introduce backwards incompatible changes to the buildboxes and using version for that seems ok. Just need to make sure to update all pipelines to use this version after it's built.

Copy link
Copy Markdown
Contributor Author

@hugoShaka hugoShaka Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following our Slack discussion, I changed the approach and installed the plugin a second time in a different location. The plugin lookup path is controlled through the HELM_PLUGINS variable. This variable will be set in:

  • build.assets/Makefile
  • .cloudbuild/ci/unit-tests.yaml
  • .github/workflows/unit-tests-helm.yaml

@jakule @r0mant could you both re-review the PR and confirm this approach is saner?

Comment thread build.assets/images.mk Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think updating buildbox version here is not too bad. We gotta have some way to introduce backwards incompatible changes to the buildboxes and using version for that seems ok. Just need to make sure to update all pipelines to use this version after it's built.

Comment thread build.assets/Dockerfile Outdated
@hugoShaka hugoShaka requested review from jakule and r0mant December 1, 2022 14:24
@hugoShaka hugoShaka changed the title buildbox: breaking - change helm unittest plugin buildbox: change helm unittest plugin Dec 1, 2022
@hugoShaka hugoShaka changed the title buildbox: change helm unittest plugin buildbox: add new helm unittest plugin fork Dec 1, 2022
Comment thread build.assets/Dockerfile
rm -r helm-tarball*)

# TODO(hugoShaka): remove this backward compatible hack with teleportv13 buildbox
RUN helm plugin install https://github.com/quintush/helm-unittest && \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we set HELM_PLUGINS for the helm plugin install command, otherwise it would install it in the same location as the old plugin below, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to do this, but helm did not respect the variable during installation 🙄 this is why the plugin is copied somewhere else, then deleted with helm plugin uninstall unittest. In the end we have 3 plugin installed:

  • new version in /home/ci/.local/share/helm/plugins-new
  • old version in /home/ci/.local/share/helm/plugins
  • old version in /root/.local/share/helm/plugins-new

@hugoShaka hugoShaka enabled auto-merge (squash) December 2, 2022 20:23
@hugoShaka hugoShaka merged commit 16b3059 into master Dec 2, 2022
@hugoShaka hugoShaka deleted the hugo/buildbox-12.1 branch December 2, 2022 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants